package tp1;

import java.util.ArrayList;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;

public class Matriz {
	
	ArrayList<Fila> filas = new ArrayList<Fila>();
	int alto;
	int ancho;

	public Celda celdaEnPosicion(int x, int y){
		return(filas.get(y).celdas.get(x));
	}
	
	public Matriz(int x, int y){
		
		ancho = x;
		alto = y;
		
		for(int i = 0; i < alto; i++){
			filas.add(new Fila(ancho));
			for(int j = 0;j < ancho - 1; j++){
				filas.get(i).celdas.add(new Celda(j,i));
			}
		}
	}
}
